<?php
//debug($credits);
?>

<table width="1024px">
    <tr ><td><div  style="float:right">
            
            
     <?php echo $this->Html->link(
        $this->Html->image('../img/add_more.png', array('alt' =>'Add more')),array('action'=>'add'),
                array('escape' => false,'class'=>'noprint')
        ); ?></div></div></td></tr>
    <tr><td>&nbsp;</td></tr>
    <tr>
        <td>

            <table width="100%" id="table" >
                <tr >
                    <th width="224px"><?php echo $this->Paginator->sort("Credit Name",'title'); ?></th>
                    <th width="450px"><?php echo "Description"; ?></th>
                    <th width="250px"><?php echo "Points"; ?></th>
                    <th width="40px">Edit</th>
                    <th width="40px">Delete</th>
                    
                </tr>
<?php foreach ($credits as $data): ?>
                    <tr id="table_content">
                        <td><?php echo $data['Credit']['title'];?></td>
                        <td><?php echo $data['Credit']['desc']; ?></td>
                        <td><?php echo $data['Credit']['point']; ?></td>
                        <td><?php echo $this->Html->link($this->Html->image('user_edit.png', array('alt' => 'Edit','title'=>'edit' ,'border'=>'0')), array('action' => 'admin_edit', $data['Credit']['id']), array('escape' => false)); ?></td>
                        <td><?php echo $this->Html->link($this->Html->image('trash.png', array('alt' => 'Delete','title'=>'Delete' ,'border'=>'0')), array('action' => 'admin_delete', $data['Credit']['id']), array('escape' => false,'onclick'=>"return confirm('Are you sure you want to delete?')")); ?></td>
                    </tr>
                        <?php endforeach; ?>
                <tr><td><?php
                        echo $this->Paginator->numbers();
                        
                        ?></td></tr>
            </table>
        </td>
    </tr>
</table>